import { getActiveInput } from "@devass/js/blur.js";
export default {
    data() {
        return {
            isFocus: false, //是否获取焦点
        };
    },
    methods: {
        //切换获取焦点
        mixins_triggerFocus(bool, eventName) {
            console.log("input base", eventName);
            if (this.isFocus) {
                this.$emit(eventName ? eventName : "blur", {
                    val: this.value,
                    vm: this,
                });
            }
            this.isFocus = bool;
        },
        //判断当前是否是获取焦点的input
        mixins_isCurrFocus() {
            let activeInput = getActiveInput();
            return activeInput.vm == this;
        },
    },
};